import Cookies from "js-cookie"
const getters = {
    // getCount: state => state.count,
    getLoginUserId: state => state.loginUserId,
    getIsAdmin: state => state.isAdmin,
    getRoles: state => state.roles,
    token: state => state.token,
    getUserName: state => state.userName,
    getStaffNum: state => state.staffNum,
    getFinishedReMsg: state => state.isFinishedReMsg === null ? Cookies.get('isFinishedReMsg') : state.isFinishedReMsg,
    getPhotoPath: (state) => { 
        if (state.photoPath === '' && Cookies.get('photoPath')) { 
            state.photoPath = Cookies.get('photoPath')
        }
        return state.photoPath
    },
}


export default getters
